package cn.edu.scau.cmi.chenyiqiu.composite.safe;

import java.util.HashSet;
import java.util.Set;

public abstract class SafeComponent {
	String say = "安全模式";
	//组织或个人名称
	String name;
	//父节点
	SafeComponent parent;
	//子节点集合
	Set<SafeComponent> childrens = new HashSet<SafeComponent> ();
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
	public SafeComponent getParent() {
		return parent;
	}

	public void setParent(SafeComponent parent) {
		this.parent = parent;
	}

	public Set<SafeComponent> getChildrens() {
		return childrens;
	}
	
	public String getSay() {
		return say;
	}
	public abstract String say();
}
